/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package uit.ejb.connection;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 *
 * @author SVN - Team
 */
public class ConnectingSQL {

    public ConnectingSQL(){

    }
   public static Connection makeConnection() throws ClassNotFoundException, SQLException{
        Connection con = null;
        Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
        String url = "jdbc:sqlserver://localhost:1433; databaseName=QuanLyKhachSan";
        con = DriverManager.getConnection(url,"sa","123456");
        return con;
   }
}
